<?php

namespace Admin\Model\DBO;

use Zend\Db\TableGateway\AbstractTableGateway;

class SearchReaderDBO extends AbstractTableGateway {

    private $sm;
    private $readerTable;

    public function __construct($serviceManager) {
        $this->sm = $serviceManager;
    }

    public function getReaderTable() {
        if (!$this->readerTable) {
            $this->readerTable = $this->sm->get('Admin\Model\ReaderTable');
        }
        return $this->readerTable;
    }
    // tra ve mot resultSet dang ( paginator co the phan trang)
    public function searchReaderName($nameReader) {
        return $this->getReaderTable()->searchReaderName($nameReader);
    }
    public function searchReaderBarcode($cardBarcode) {
          return $this->getReaderTable()->searchReaderBarcode($cardBarcode);
    }

}